<%-- 
    Document   : CommentedContentList
    Created on : May 24, 2010, 12:15:45 AM
    Author     : andrei
--%>

<%@page import="java.lang.*"%>
<%@page import="java.util.*"%>
<%@page import="entities.*" %>
<%
    List<ContentEntity> contentList = (List)request.getAttribute("commentedContents");
    if (contentList.size() > 0){
        Iterator<ContentEntity> contentListIt = contentList.iterator();
        out.println("<div>");
        while (contentListIt.hasNext()){
            ContentEntity content = contentListIt.next();
            out.println("<div class=\"post\">");
                out.println("<h3><a href=\""+request.getContextPath()+"/content/view?cid="+content.getCid()+"\">"+content.getTitle()+"</a></h3>");
                out.println("<p>"+content.getBody()+"</p>");
                out.println("<div><a href=\""+request.getContextPath()+"/content/view?cid="+content.getCid()+"\">Read more -></a></div>");
            out.println("</div>");
        }
        out.println("</div>");
    } else {
        out.print("<div>You have no comments.</div>");
    }
%>
